<?php
namespace app\configs\validate;
    
use think\Validate;
    
    /**
     * 配置验证器
     * @package app\admin\validate
     */
    class Group extends Validate
    {
        // 定义验证规则
        protected $rule = [
            'name|群组名称'  => 'require',
            'password|群组密码' => 'require|alphaNum|length:6',
        ];
        
        // 定义场景，供快捷编辑时验证
        protected $scene = [
            'name'  => ['name'],
            'password' => ['password'],
        ];
    }
